package com.flurry.android;

import android.util.Log;
import com.flurry.android.caching.ObjectData;
import java.util.HashMap;
import java.util.Vector;
import org.apache.http.NameValuePair;
import org.json.JSONObject;

final class bc
  implements AppCloudResponseHandler
{
  bc(CacheSyncManager paramCacheSyncManager, String paramString, boolean paramBoolean)
  {
  }

  public final void handleResponse(AppCloudResponse paramAppCloudResponse)
    throws Exception
  {
    if (paramAppCloudResponse.isSuccessful())
    {
      ObjectData localObjectData = CacheSyncManager.a(this.df).w(this.de);
      localObjectData.setId(paramAppCloudResponse.getResponse().getString("_id"));
      az localaz = CacheSyncManager.b(this.df);
      String str1 = this.de;
      int i = 0;
      if (i < localObjectData.getKeyValues().size())
      {
        String str2 = ((NameValuePair)localObjectData.getKeyValues().get(i)).getName();
        String str3 = ((NameValuePair)localObjectData.getKeyValues().get(i)).getValue();
        String str4 = localObjectData.getId();
        if (localObjectData.isUser())
          localaz.a(str2, str3, str4, str1, null);
        while (true)
        {
          i++;
          break;
          localaz.a(str2, str3, str4, str1, localObjectData.getCollectionName());
        }
      }
      CacheSyncManager.c(this.df).s(this.de);
      AppCloudResponseHandler localAppCloudResponseHandler2 = (AppCloudResponseHandler)CacheSyncManager.b().get(this.de);
      if (localAppCloudResponseHandler2 != null)
        localAppCloudResponseHandler2.handleResponse(paramAppCloudResponse);
      CacheSyncManager.b().remove(this.de);
      return;
    }
    if (paramAppCloudResponse.getResponseMessage().equals("account already exists for email"))
    {
      CacheSyncManager.a(this.df).w(this.de);
      CacheSyncManager.c(this.df).s(this.de);
      AppCloudResponseHandler localAppCloudResponseHandler1 = (AppCloudResponseHandler)CacheSyncManager.b().get(this.de);
      if (localAppCloudResponseHandler1 != null)
        localAppCloudResponseHandler1.handleResponse(paramAppCloudResponse);
      CacheSyncManager.b().remove(this.de);
    }
    Log.e("CacheSyncManager", "CREATE didn't proceed");
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.bc
 * JD-Core Version:    0.6.2
 */